package study07;

/**
* @author GZQ
* @Date 2023/11/23
 */

//父类
class Animal{
    String name;
    int age;
}

//子类
class Cat1 extends Animal{
    String color;
    void shout(){
        System.out.println("名字是："+name + "年龄是：" + age + "岁," + "肤色是" + color + "," + "正在喵喵喵........" );
    }
}

public class Cat {
    public static void main(String[] args) {
        Cat1 cat = new Cat1();
        cat.name = "波斯猫";
        cat.age = 3;
        cat.color = "白色";
        cat.shout();
    }
}
